-- GENERATED SPELL FOR [Warlord Salaris] --


function spell0_24559(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(27578,pUnit)
pUnit:RegisterEvent('Sorts_24559', 558, 1)
end

function spell1_24559(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(27581,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24559', 5337, 1)
end

function spell2_24559(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_24559', 580, 1)
end

function spell3_24559(pUnit, Event) --@Frightening Shout,n/a--
pUnit:FullCastSpellOnTarget(19134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24559', 6305, 1)
end

function spell4_24559(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(27584,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24559', 15251, 1)
end

function spell5_24559(pUnit, Event) --@Intercept,n/a--
pUnit:FullCastSpellOnTarget(27577,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24559', 541, 1)
end

function spell6_24559(pUnit, Event) --@Medallion of Immunity,Self--
pUnit:FullCastSpellOnTarget(46227,pUnit)
pUnit:RegisterEvent('Sorts_24559', 302, 1)
end

function spell7_24559(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(44268,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24559', 10000, 1)
end

function spell8_24559(pUnit, Event) --@Piercing Howl,Self--
pUnit:FullCastSpellOnTarget(23600,pUnit)
pUnit:RegisterEvent('Sorts_24559', 6257, 1)
end

function Sorts_24559(pUnit, Event)
local choix_sorts_24559 = math.random(0, 8)
if choix_sorts_24559 == 0 then
pUnit:RegisterEvent('spell0_24559', 1, 1)
end
if choix_sorts_24559 == 1 then
pUnit:RegisterEvent('spell1_24559', 1, 1)
end
if choix_sorts_24559 == 2 then
pUnit:RegisterEvent('spell2_24559', 1, 1)
end
if choix_sorts_24559 == 3 then
pUnit:RegisterEvent('spell3_24559', 1, 1)
end
if choix_sorts_24559 == 4 then
pUnit:RegisterEvent('spell4_24559', 1, 1)
end
if choix_sorts_24559 == 5 then
pUnit:RegisterEvent('spell5_24559', 1, 1)
end
if choix_sorts_24559 == 6 then
pUnit:RegisterEvent('spell6_24559', 1, 1)
end
if choix_sorts_24559 == 7 then
pUnit:RegisterEvent('spell7_24559', 1, 1)
end
if choix_sorts_24559 == 8 then
pUnit:RegisterEvent('spell8_24559', 1, 1)
end
end

function mob24559_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24559', math.random(1500, 3000), 1)
end

function mob24559_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24559_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24559_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24559, 1, 'mob24559_Action')
RegisterUnitEvent(24559, 2, 'mob24559_Leave')
RegisterUnitEvent(24559, 3, 'mob24559_Kill')
RegisterUnitEvent(24559, 4, 'mob24559_Die')
